package com.tanhua.config;

import com.tanhua.config.properties.Faceproperties;
import com.tanhua.config.properties.Ossproperties;
import com.tanhua.config.properties.Smsproperties;
import com.tanhua.config.template.FaceTemeplate;
import com.tanhua.config.template.OssTemeplate;
import com.tanhua.config.template.SendMessageTemeplate;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;

@EnableConfigurationProperties({
        Smsproperties.class,
        Ossproperties.class,
        Faceproperties.class
})

public class TanhuaAutoConfigration {

    @Bean
    public SendMessageTemeplate smsTemplate(Smsproperties smsproperties) {
        return new SendMessageTemeplate(smsproperties);
    }

    @Bean
    public OssTemeplate  ossTemeplate(Ossproperties ossproperties){
        return new OssTemeplate(ossproperties);
    }

    @Bean
    public FaceTemeplate faceTemeplate(Faceproperties faceproperties){
        return new FaceTemeplate(faceproperties);
    }
}
